#pragma once

#include "app/application.h"
#include "video/program.h"
#include "input/keyboard.h"
#include "scene/cube.h"
#include "scene/fsquad.h"
#include "scene/mesh.h"
#include "video/fbo.h"
#include "video/video.h"

namespace natrium {
	namespace app {
		/*
		 * Tests various shaders
		 */
		class TestShaders:
			public Application
		{
		public:
			TestShaders();
			virtual ~TestShaders();

			virtual bool init();
			virtual void update();
			virtual void shutdown();

			void operator()(const video::WindowCreated& wc);
			void operator()(const input::Keyboard::KeyPressed& kp);

			void pass1();
			void pass2();

		private:
			video::Program mShaderProgram;

			GLuint mProgramPass1;
			GLuint mProgramPass2;

			std::unique_ptr<scene::Cube> mCube;
			std::unique_ptr<scene::Mesh> mMesh;

			std::unique_ptr<scene::FSQuad> mFSQuad;
			std::unique_ptr<video::FrameBufferObject> mFBO;
		
			glm::mat4 mModel;
			glm::mat4 mView;
			glm::mat4 mProjection;

			float mAngle;

		
		};
	}
}